<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  <style type="text/css">
  		a{
  		text-decoration: none;}
  		a:LINK{
  		color:#EE4000}
  		a:VISITED{
  		color: #F08080}
		.login{
			background-color:#FFC0CB;
			width: 400px;
			height:auto;
			margin: 0 auto;
			text-align: center;
			margin-top:100px;
			line-height: 40px;
		}
		.btn{
			width: 100px;
			height: 30px;
			line-height:30px;
			font-size: 16px;
			background-color: #FF7F50;
			border: none;
			color:white;
		}
	  table,table tr th, table tr td { border:1.9px solid 	#636363; }
        table { width: 400px; min-height: 45px; line-height: 45px; text-align: center; border-collapse: collapse;}
	</style>
  <body>
    <div class="login">
	   <table style="text-align: center;">
   		<th style="text-align: center;" colspan="7">学生信息列表&nbsp;&nbsp;<a href="<%=basePath %>stu_add.jsp" style="display: inline-block;line-height: 5px"><b>添加学生信息</b></a></th>
   		
   		<tr style="font-size: 18px;font-weight: 400;"  >
   			<td>学号</td>
   			<td>姓名</td>
   			<td>地址</td>
   			<td>性别</td>
   			<td>年龄</td>
   			<td colspan="2">操作</td>
   		</tr>
   		<c:forEach items="${student}" var="student">
   		<tr >
   			<td>${student.stu_id}</td>
   			<td>${student.stu_name}</td>
   			<td>${student.stu_address}</td>
   			<td>${student.stu_sex}</td>
   			<td>${student.stu_age}</td>
   			<td><a href="<%=basePath %>queryById_action?stu_id=${student.stu_id}"><strong>修改</strong></a></td>
   			<td><a href="delete_action?stu_id=${student.stu_id}"><b>删除</b></a></td>
   		</tr>
   		</c:forEach>
	   </table>
	   <a href="#">首页</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#">上一页</a>&nbsp;&nbsp;&nbsp;&nbsp;
	   <a href="#">下一页</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#">最后一页</a>
   </div>
  </body>
</html>
